package org.marsdonne.auth.restful;

import com.nimbusds.jose.jwk.JWKSet;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.Map;

@RestController
public class EmbeddedJwkSetController {
    @Resource
    private JWKSet jwkSet;

    @GetMapping("/.certs/jwks.json")
    Map<String, Object> keys() {
        return this.jwkSet.toJSONObject();
    }
}
